"""
    Extract worker's educational histories provided in resumes to Glassdoor.
"""

fileSeed = "C:/Users/jsock/Dropbox/Research/GD/International"

functionPathA = fileSeed + '/Replication/Functions'
functionPathB = "/" + fileSeed + '/Replication/Functions/'

savePath = fileSeed + "/Replication/Data/"

import sys
#sys.path.append('/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages')
sys.path.insert(0, functionPathA)
sys.path.insert(0, functionPathB)
from Function_extract_resumes_educ import extractResumeEduc

import pymssql
import pandas as pd
import yaml
import os
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
import csv
import statsmodels.api as sm

#Run to setup connection to Gandalf
config = yaml.load(open(os.path.expanduser('~/config.yaml')), Loader=yaml.FullLoader)
conn = pymssql.connect(**config.get('gandalf'))

dfEduc = extractResumeEduc(conn)

dfEduc.to_csv(savePath + 'Resumes_educ_07_16_2022.csv')
